package com.gome.axwl.aoc.service;

import com.github.pagehelper.PageInfo;
import com.gome.axwl.aoc.entity.po.ContractPo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * Created by wanglongyu on 2018/7/13.
 */
public interface ContractService {
    /***
     * 分页查询合同信息
     * @param contractName
     * @param status
     * @param startTime
     * @param endTime
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<ContractPo> queryContract(String contractName, String contractNo,
                                       String carrierPhone,String carrierName,Integer status, Date startTime,
                                       Date endTime,Integer pageNum,Integer pageSize);

    /***
     * 送签后生成合同
     * @param contractPo
     * @return
     */
    int addContract(ContractPo contractPo);

    /***
     * 根据申请单号Id 获取合同
     * @param applyInfoId
     * @return
     */
    ContractPo getByApplyInfoId(@Param("applyInfoId")Integer applyInfoId);


    int sign(String signPerson,Integer applyInfoId,Date modifyTime);

    int pass(String signPerson,Integer auditStatus,Integer applyInfoId,Date modifyTime);

    int unpass(String unpassReason,Integer auditStatus,Integer applyInfoId,Date modifyTime);

    /**
     * 通过合同编码查询合同
     * @param contractNo
     * @return
     */
    ContractPo queryByContractNo(String contractNo);
}
